package com.ztesoft.book.core.sys.sysloginhis.qo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.ztesoft.book.common.constant.CommonParamUtil;
import com.ztesoft.book.core.base.base.qo.BaseEntityQO;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * 登录记录表 登录记录表管理
 *
 * @author 童国光
 * 创建时间：2021-07-26
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class SysLoginHisQO extends BaseEntityQO {


    /**
     * 登录人.
     */
    private String userId;

    /**
     * 登录时间.
     */
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @DateTimeFormat(pattern = CommonParamUtil.NORMAL_FORMAT)
    @JsonFormat(pattern = CommonParamUtil.NORMAL_FORMAT)
    private LocalDateTime loginTime;

    /**
     * 登录ip.
     */
    private String loginIp;

}
